
<%@ page language="java" contentType="text/html; charset=GBK"
	pageEncoding="GBK" import="bean.PollUser, model.PollUserImpl" %>
	
	<%
	if(request.getParameter("newPoll") == null){
		
		String pollid = (String)request.getParameter("pollid");
		String pollName = (String)request.getParameter("pollName");
		System.out.println("pollName is:"+pollName);
		System.out.println("pollid is:"+pollid);
		session.setAttribute("pollid", pollid);
		session.setAttribute("pollName", pollName);
		
		if(request.getParameter("delete") != null){
			response.sendRedirect("/DBP/PollCreator/removePoll.jsp?pollid="+pollid+"&pollname="+pollName);
		}
		response.sendRedirect("PollCreator/addQuestions.jsp?pollid="+pollid+"&pollname="+pollName);
	}else{
		response.sendRedirect("PollCreator/newPoll.jsp?newPoll=true");
	}
	
	/*TODO: actually redirect to poll creation page, when available*/
	%>
	
	